package com.jumi.microservice.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

public enum BankType implements IEnum<String> {

    ICBC("ICBC","中国工商银行"),
    BOC("BOC","中国银行"),
    ABC("ABC","中国农业银行"),
    CCB("CCB","中国建设银行"),
    CMB("CMB","中国招商银行"),
    CEB("CEB","中国光大银行"),
    CMBC("CMBC","中国民生银行"),
    EXIMBC("EXIMBC","中国进出口银行"),
    HSBC("HSBC","汇丰银行"),
    BCM("BCM","交通银行"),
    SPDB("SPDB","上海浦东发展银行"),
    HXB("HXB","华夏银行"),
    CIB("CIB","兴业银行"),
    BOB("BOB","北京市商业银行"),
    GDB("GDB","广东发展银行"),
    SDB("SDB","深圳发展银行"),
    CITIC("CITIC", "中信银行");

    private String value;
    private String desc;

    BankType(String value, String desc) {
        this.value=value;
        this.desc=desc;
    }


    public String getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }

    public static String getTypeByValue(String value){
        BankType[] types = BankType.values();
        for (BankType type : types) {
            if(type.value.equals(value)){
                return type.desc;
            }
        }
        return null;
    }

}
